import { PORT1 } from "@/api/config/servicePort";
import Http from "@/api/index";

const baseUrl = PORT1 + "/system/country";

export const editApi = (params: any) => {
  return Http.put(baseUrl + "/edit", params);
};

export const getInfo = () => {
  return Http.get(baseUrl + "/info");
};

export const editAssist = (params: any) => {
  return Http.put(baseUrl + "/edit_assist", params);
};

export const editPrivate = (params: any) => {
  return Http.put(baseUrl + "/edit_private", params);
};

export const getAssist = () => {
  return Http.get(baseUrl + "/get_assist");
};

export const getPrivate = () => {
  return Http.get(baseUrl + "/get_private");
};

const originalUrl = baseUrl + "/origin";
export const createOrigin = (params: any) => {
  return Http.post(originalUrl + "/add", params);
};

export const editOrigin = (params: any) => {
  return Http.put(originalUrl + "/edit", params);
};

export const deleteOrigin = (params: any) => {
  return Http.post(originalUrl + "/delete", params);
};

export const getOriginList = () => {
  return Http.get(originalUrl + "/list");
};
